<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>基于Bootstrap可编辑的HTML表格jquery插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库</title>
	<!-- <link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> -->
	<!-- <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> -->
	<link rel="stylesheet" href="css/font-awesome.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
	<style type="text/css">
		.box {
			width: 20px;
			height: 20px;
			padding: 2px;
			border: 1px solid #ccc;
			border-radius: 2px;
		}
	</style>
</head>

<body>
	<div class="htmleaf-container">
		<div class="container">
			<div class="row">
				<div class="col-md-12" style="padding:2em 0;">
					<p>点击
						<i class="fa fa-pencil box"></i> 按钮可以对表格进行编辑，点击
						<i class="fa fa-trash-o box"></i>按钮可以将该表格行删除。</p>
					<div class="table-responsive">
						<table class="table table-bordered table-striped" id="mytable">
							<thead>
								<tr>
									<td>姓名</td>
									<td>年龄</td>
									<td>email</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>张三</td>
									<td>25</td>
									<td>zs@163.com</td>
								</tr>
								<tr>
									<td>李四</td>
									<td>23</td>
									<td>lisi@qq.com</td>
								</tr>
								<tr>
									<td>王五</td>
									<td>24</td>
									<td>ww@126.com</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="col-md-12" style="padding-bottom:2em;">
					<button class="btn btn-info" id="add">
						<i class="fa fa-plus"></i> 添加新的表格行</button>
				</div>
			</div>
		</div>
	</div>
	<script>
		window.jQuery || document.write('<script src="js/jquery-1.11.0.min.js"><\/script>')
	</script>
	<script type="text/javascript" src="js/bootstable.js"></script>
	<script type="text/javascript">
		$('#mytable').SetEditable({
			$addButton: $('#add')
		});
	</script>
</body>

</html>